﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using ApproveFlowEngine.Split;

namespace ApproveFlowEngine.EntityFrameworkCoreSplitTable.EFCore.Core
{
    public interface ISplitTableManager<TDbContext> where TDbContext : SplitDbContext
    {
        Task CheckAndCreateTable<TEntity>() where TEntity : ISplitTable;
        Task<string> GetSplitTableTail<TEntity>(DateTime current) where TEntity : ISplitTable;
        Task<string> GetSplitTableTail<TEntity>(TEntity entity) where TEntity : ISplitTable;
        Task<List<string>> GetSplitTableTails<TEntity>(DateTime? begin = null, DateTime? end = null) where TEntity : ISplitTable;
        Task<List<string>> GetTableNames();
        Task<List<string>> GetValidTails<TEntity>(IEnumerable<string> tails) where TEntity : ISplitTable;
    }
}